import request from '@/utils/request';
import qs from 'qs';
import { method, pull } from 'lodash';

// 开始
let appId = process.env.VUE_APP_WX_APPID;
const WxUserInfoUrl = 'wx/redirect/' + appId + '/greet'; //微信用户信息
export function getWxUserInfo(query) {
    return request({
        url: WxUserInfoUrl,
        method: 'get',
        params: query
    })
}

const IndexUrl = 'wx/home/index'; //首页数据接口
export function getHome(query) {
    return request({
        url: IndexUrl,
        method: 'get',
        params: query
    })
}
// 上传身份证
const loadcard = 'wx/auth/addUserCard';
export function Uploadcard(data) {
    return request({
        url: loadcard,
        method: 'post',
        data,
    })
}

// 协议正文

export function agreemsg(query) {
    return request({
        url: 'wx/article/detail',
        method: 'get',
        params: query
    })
}

// 首页小标题栏
const homebuton = 'wx/home/homeButton';
export function gethomebuton(query) {
    return request({
        url: homebuton,
        method: 'get',
        params: query,
    })
}

// 首页小标题栏
const homebutons = 'wx/home/homeButtons';
export function gethomebutons(query) {
    return request({
        url: homebutons,
        method: 'get',
        params: query,
    })
}


const MallIndexUrl = 'wx/home/mallindex'; //商城首页数据接口
export function getMallHome(query) {
    return request({
        url: MallIndexUrl,
        method: 'get',
        params: query
    })
}

const getUsedDefaultTimeUrl = 'wx/home/getUsedDefaultTime'; //获取默认发布过期时间，默认为10天
export function getUsedDefaultTime() {
    return request({
        url: getUsedDefaultTimeUrl,
        method: 'get'
    })
}

const getProjectDefaultTimeUrl = 'wx/home/getProjectDefaultTime'; //获取默认发布过期时间，默认为10天
export function getProjectDefaultTime() {
    return request({
        url: getProjectDefaultTimeUrl,
        method: 'get'
    })
}


const getRentDefaultTimeUrl = 'wx/home/getRentDefaultTime'; //获取默认发布过期时间，默认为10天
export function getRentDefaultTime() {
    return request({
        url: getRentDefaultTimeUrl,
        method: 'get'
    })
}


const getTeamsDefaultTimeUrl = 'wx/home/getTeamsDefaultTime'; //获取默认发布过期时间，默认为10天
export function getTeamsDefaultTime() {
    return request({
        url: getTeamsDefaultTimeUrl,
        method: 'get'
    })
}




const CatalogList = 'wx/catalog/index'; //分类目录全部分类数据接口
export function catalogList() {
    return request({
        url: CatalogList,
        method: 'get'
    })
}

const CatalogCurrent = 'wx/catalog/current'; //分类目录当前分类数据接口
export function catalogCurrent(query) {
    return request({
        url: CatalogCurrent,
        method: 'get',
        params: query
    })
}

const AuthLoginByWeixin = 'wx/auth/login_by_weixin'; //微信登录
export function authLoginByWeixin(data) {
    //alert(JSON.stringify(data))
    return request({
        url: AuthLoginByWeixin,
        method: 'post',
        data
    })
}


const AuthLoginByAccount = 'wx/auth/login'; //账号登录
export function authLoginByAccount(data) {
    return request({
        url: AuthLoginByAccount,
        method: 'post',
        data
    })
}
const AuthLogout = 'wx/auth/logout'; //账号登出
export function authLogout() {
    return request({
        url: AuthLogout,
        method: 'post'
    })
}
const AuthInfo = 'wx/auth/info'; //用户信息
export function authInfo() {
    return request({
        url: AuthInfo,
        method: 'get'
    })
}

const UserInfo = 'wx/auth/userinfo'; //用户信息
export function userInfo(query) {
    return request({
        url: UserInfo,
        method: 'get',
        params: query
    })
}

const CardInfo = 'wx/auth/cardinfo'; //用户信息
export function cardInfo(query) {
    return request({
        url: CardInfo,
        method: 'get',
        params: query
    })
}


const AuthProfile = 'wx/auth/profile'; //账号修改
export function authProfile(data) {
    return request({
        url: AuthProfile,
        method: 'post',
        data
    })
}

const AuthReset = 'wx/auth/reset'; //账号密码重置
export function authReset(data) {
    return request({
        url: AuthReset,
        method: 'post',
        data
    })
}
const AuthRegisterCaptcha = 'wx/auth/regCaptcha'; //注册验证码
export function authRegisterCaptcha(data) {
    return request({
        url: AuthRegisterCaptcha,
        method: 'post',
        data
    })
}
const AuthCaptcha = 'wx/auth/captcha'; //验证码
export function authCaptcha(data) {
    return request({
        url: AuthCaptcha,
        method: 'post',
        data
    })
}
const AuthCreateQrCode = 'wx/auth/createQrCode'; //创建二维码
export function createQrCode(data) {
    return request({
        url: AuthCreateQrCode,
        method: 'post',
        data
    })
}

const AuthSmsCode = 'wx/auth/regCaptcha'; //获取短信验证码
export function getSmsCode(data) {
    return request({
        url: AuthSmsCode,
        method: 'post',
        data
    })
}

const AuthRegister = 'wx/auth/register'; //账号注册
export function submit(data) {
    return request({
        url: AuthRegister,
        method: 'post',
        data
    })
}

// const AuthRegisterInvite = 'wx/invite/register'; //金牌会员邀请账号注册
// export function submitInvite(data) {
//     return request({
//         url: AuthRegisterInvite,
//         method: 'post',
//         data
//     })
// }

const ArticleDetail = 'wx/article/detail'; //获得文章的详情
export function articleDetail(query) {
    return request({
        url: ArticleDetail,
        method: 'get',
        params: query
    })
}

const GoodsCount = 'wx/goods/count'; //统计商品总数
export function goodsCount() {
    return request({
        url: GoodsCount,
        method: 'get'
    })
}

const GetMemberGoods = 'wx/goods/getMemberGoods'; //获取所有会员商品
export function getMemberGoods(query) {
    return request({
        url: GetMemberGoods,
        method: 'get',
        params: query
    })
}

const GetMemberInfoByUserId = 'wx/user/getMemberInfoByUserId'; // 获取会员信息 getMemberInfoByUserId
export function getMemberInfoByUserId(query) {
    return request({
        url: GetMemberInfoByUserId,
        method: 'get',
        params: query
    })
}
// 开店
export function shopadd(data) {
    return request({
        url: 'wx/shop/add',
        method: 'post',
        data
    })
}
// 联盟开店
export function lianadd(data) {
    return request({
        url: 'wx/shop/addLianMengShop',
        method: 'post',
        data
    })
}

export const GoodsList = 'wx/goods/list'; //获得商品列表
export function goodsList(query) {
    return request({
        url: GoodsList,
        method: 'get',
        params: query
    })
}

export const GoodsVideoList = 'wx/goods/queryHaveVideo'; //获取视频专区商品列表
export function goodsVideoList(query) {
    return request({
        url: GoodsVideoList,
        method: 'get',
        params: query
    })
}

const FirstCategory = 'wx/catalog/getfirstcategory'; //获得一级分类
export function firstCategory(query) {
    return request({
        url: FirstCategory,
        method: 'get',
        params: query
    })
}
export const listByFirstCategory = 'wx/goods/listByFirstCategory'; //获得一级分类下商品列表
export function ListByFirstCategory(query) {
    return request({
        url: listByFirstCategory,
        method: 'get',
        params: query
    })
}
const GoodsCategory = 'wx/goods/category'; //获得分类数据
export function goodsCategory(query) {
    return request({
        url: GoodsCategory,
        method: 'get',
        params: query
    })
}
const GoodsDetail = 'wx/goods/detail'; //获得商品的详情
export function goodsDetail(query) {
    return request({
        url: GoodsDetail,
        method: 'get',
        params: query
    })
}
const GoodsExpress = 'wx/goods/getExpress'; //获得商品的详情
export function goodsExpress(query) {
    return request({
        url: GoodsExpress,
        method: 'get',
    })
}
const GoodsRelated = 'wx/goods/related'; //商品详情页的关联商品（大家都在看）

const BrandList = 'wx/brand/list'; //品牌列表
export function brandList(query) {
    return request({
        url: BrandList,
        method: 'get',
        params: query
    })
}
const BrandDetail = 'wx/brand/detail'; //品牌详情
export function brandDetail(query) {
    return request({
        url: BrandDetail,
        method: 'get',
        params: query
    })
}

const CartList = 'wx/cart/index'; //获取购物车的数据
export function cartList(query) {
    return request({
        url: CartList,
        method: 'get',
        params: query
    })
}
const CartAdd = 'wx/cart/add'; // 添加商品到购物车
export function cartAdd(data) {
    return request({
        url: CartAdd,
        method: 'post',
        data
    })
}
const CartFastAdd = 'wx/cart/fastadd'; // 立即购买商品
export function cartFastAdd(data) {
    return request({
        url: CartFastAdd,
        method: 'post',
        data
    })
}
const CartUpdate = 'wx/cart/update'; // 更新购物车的商品
export function cartUpdate(data) {
    return request({
        url: CartUpdate,
        method: 'post',
        data
    })
}
const CartDelete = 'wx/cart/delete'; // 删除购物车的商品
export function cartDelete(data) {
    return request({
        url: CartDelete,
        method: 'post',
        data
    })
}
const CartChecked = 'wx/cart/checked'; // 选择或取消选择商品
export function cartChecked(data) {
    return request({
        url: CartChecked,
        method: 'post',
        data
    })
}
const CartGoodsCount = 'wx/cart/goodscount'; // 获取购物车商品件数
export function cartGoodsCount() {
    return request({
        url: CartGoodsCount,
        method: 'get'
    })
}
const CartCheckout = 'wx/cart/checkout'; // 下单前信息确认
export function cartCheckout(query) {
    return request({
        url: CartCheckout,
        method: 'get',
        params: query
    })
}

const CollectList = 'wx/collect/list'; //收藏列表
export function collectList(query) {
    return request({
        url: CollectList,
        method: 'get',
        params: query
    })
}
const CollectAddOrDelete = 'wx/collect/addordelete'; //添加或取消收藏
export function collectAddOrDelete(data) {
    return request({
        url: CollectAddOrDelete,
        method: 'post',
        data
    })
}
const CommentList = 'wx/comment/list'; //评论列表
const CommentCount = 'wx/comment/count'; //评论总数
const CommentPost = 'wx/comment/post'; //发表评论

const TopicList = 'wx/topic/list'; //专题列表
export function topicList(query) {
    return request({
        url: TopicList,
        method: 'get',
        params: query
    })
}
const TopicDetail = 'wx/topic/detail'; //专题详情
export function topicDetail(query) {
    return request({
        url: TopicDetail,
        method: 'get',
        params: query
    })
}
const TopicRelated = 'wx/topic/related'; //相关专题
export function topicRelated(query) {
    return request({
        url: TopicRelated,
        method: 'get',
        params: query
    })
}

const SearchIndex = 'wx/search/index'; //搜索关键字
const SearchResult = 'wx/search/result'; //搜索结果
const SearchHelper = 'wx/search/helper'; //搜索帮助
const SearchClearHistory = 'wx/search/clearhistory'; //搜索历史清楚

const AddressList = 'wx/address/list'; //收货地址列表
export function addressList(query) {
    return request({
        url: AddressList,
        method: 'get',
        params: query
    })
}

const AddressDetail = 'wx/address/detail'; //收货地址详情
export function addressDetail(query) {
    return request({
        url: AddressDetail,
        method: 'get',
        params: query
    })
}
const AddressSave = 'wx/address/save'; //保存收货地址
export function addressSave(data) {
    return request({
        url: AddressSave,
        method: 'post',
        data
    })
}
const AddressDelete = 'wx/address/delete'; //保存收货地址
export function addressDelete(data) {
    return request({
        url: AddressDelete,
        method: 'post',
        data
    })
}

const ExpressQuery = 'wx/express/query'; //物流查询

const OrderSubmit = 'wx/order/submit'; // 提交订单
export function orderSubmit(data) {
    return request({
        url: OrderSubmit,
        method: 'post',
        data
    })
}
const HandsetChange = 'wx/order/changeHandsetAmount'; // 提交订单
export function handsetChange(data) {
    return request({
        url: HandsetChange,
        method: 'post',
        data
    })
}
const OrderPrepay = 'wx/order/prepay'; // 订单的预支付会话
export function orderPrepay(data) {
    return request({
        url: OrderPrepay,
        method: 'post',
        data
    })
}
export const OrderList = 'wx/order/list'; //订单列表
export function orderList(query) {
    return request({
        url: OrderList,
        method: 'get',
        params: query
    })
}
const OrderDetail = 'wx/order/submitDetail?'; //订单详情
export function orderDetail(query) {
    return request({
        url: OrderDetail + qs.stringify(query, { arrayFormat: 'repeat' }),
        method: 'get',
    })
}
const RemindDelivery = 'wx/order/remindDelivery'; //订单详情
export function remindDelivery(data) {
    return request({
        url: RemindDelivery,
        method: 'post',
        data
    })
}
const OrderCancel = 'wx/order/cancel'; //取消订单
export function orderCancel(data) {
    return request({
        url: OrderCancel,
        method: 'post',
        data
    })
}
const OrderRefund = 'wx/order/refund'; //退款取消订单
export function orderRefund(data) {
    return request({
        url: OrderRefund,
        method: 'post',
        data
    })
}
const OrderDelete = 'wx/order/delete'; //删除订单
export function orderDelete(data) {
    return request({
        url: OrderDelete,
        method: 'post',
        data
    })
}
const OrderConfirm = 'wx/order/confirm'; //确认收货
export function orderConfirm(data) {
    return request({
        url: OrderConfirm,
        method: 'post',
        data
    })
}
const OrderGoods = 'wx/order/goods'; // 代评价商品信息
const OrderComment = 'wx/order/comment'; // 评价订单商品信息

const FeedbackAdd = 'wx/feedback/submit'; //添加反馈
export function feedbackAdd(data) {
    return request({
        url: FeedbackAdd,
        method: 'post',
        data
    })
}

const FootprintList = 'wx/footprint/list'; //足迹列表
const FootprintDelete = 'wx/footprint/delete'; //删除足迹
const FootprintUpdate = 'wx/footprint/updateDuration'; //更新足迹
const footprintListByUserId = 'wx/footprint/listByUserId'; //更新信息

export function updateDuration(data) {
    return request({
        url: FootprintUpdate,
        method: 'post',
        data
    })
}
export function getFootprintList(query) {
    return request({
        url: footprintListByUserId,
        method: 'get',
        params: query
    })
}

const UserFormIdCreate = 'wx/formid/create'; //用户FromId，用于发送模版消息

const GrouponList = 'wx/groupon/list'; //团购列表
export function grouponList(query) {
    return request({
        url: GrouponList,
        method: 'get',
        params: query
    })
}
const GroupOn = 'wx/groupon/query'; //团购API-查询
const GroupOnMy = 'wx/groupon/my'; //团购API-我的团购
const GroupOnDetail = 'wx/groupon/detail'; //团购API-详情
const GroupOnJoin = 'wx/groupon/join'; //团购API-详情

const CouponList = 'wx/coupon/list'; //优惠券列表
export function couponList(query) {
    return request({
        url: CouponList,
        method: 'get',
        params: query
    })
}
export const CouponMyList = 'wx/coupon/mylist'; //我的优惠券列表
export function couponMyList(query) {
    return request({
        url: CouponMyList,
        method: 'get',
        params: query
    })
}
const CouponSelectList = 'wx/coupon/selectlist'; //当前订单可用优惠券列表
export function couponSelectList(query) {
    return request({
        url: CouponSelectList,
        method: 'get',
        params: query
    })
}
const CouponReceive = 'wx/coupon/receive'; //优惠券领取
export function couponReceive(data) {
    return request({
        url: CouponReceive,
        method: 'post',
        data
    })
}
const CouponExchange = 'wx/coupon/exchange'; //优惠券兑换

const StorageUpload = 'wx/storage/upload'; //图片上传,
export function storageUpload(data) {
    return request({
        url: StorageUpload,
        method: 'post',
        data
    })
}

const UserIndex = 'wx/user/index'; //个人页面用户相关信息
export function userIndex() {
    return request({
        url: UserIndex,
        method: 'get'
    })
}

const ManagerList = 'wx/manager/list'; //个人页面用户相关信息
export function managerList(query) {
    return request({
        url: ManagerList,
        method: 'get',
        params: query
    })
}

const ManagerDetail = 'wx/manager/detail'; //个人页面用户相关信息
export function managerDetail(query) {
    return request({
        url: ManagerDetail,
        method: 'get',
        params: query
    })
}

const GetUserByManagerId = 'wx/user/queryByManagerId'; //根据managerid获取用户信息
export function getUserByManagerId(query) {
    return request({
        url: GetUserByManagerId,
        method: 'get',
        params: query
    })
}

const CustomersList = 'wx/user/customers'; //个人页面用户相关信息
export function customersList(query) {
    return request({
        url: CustomersList,
        method: 'get',
        params: query,
    })
}
const CustomersList_invite = 'wx/invite/customers'; //个人页面用户相关信息(金牌会员名下)
export function customersList_invite(query) {
    return request({
        url: CustomersList_invite,
        method: 'get',
        params: query,
    })
}

const CustomersListType = 'wx/user/queryCustomersByType'; //个人页面用户分组
export function customersListType(query) {
    return request({
        url: CustomersListType,
        method: 'get',
        params: query
    })
}

const QueryNoKfCustomers = 'wx/user/queryNoKfCustomers'; //获取验证用户列表
export function queryNoKfCustomers(query) {
    return request({
        url: QueryNoKfCustomers,
        method: 'get',
        params: query
    })
}

const UpdateNoKfCustomers = 'wx/user/updateNoKfCustomers'; //个人验证用户操作
export function updateNoKfCustomers(data) {
    return request({
        url: UpdateNoKfCustomers,
        method: 'post',
        data
    })
}

const SetTop = 'wx/user/setTop'; //个人页面用户相关信息
export function setTop(data) {
    return request({
        url: SetTop,
        method: 'post',
        data
    })
}

// 首页全部信息
export function hmeinfo(query) {
    return request({
        url: 'wx/home/homeInfo',
        method: "get",
        params: query,
    })
}

const MemberCustomers = 'wx/user/memberCustomers'; //个人页面会员客户相关信息
export function memberCustomers(query) {
    return request({
        url: MemberCustomers,
        method: 'get',
        params: query
    })
}
const MemberCustomers_invite = 'wx/invite/memberCustomers'; //个人页面会员客户相关信息(金牌会员名下)
export function memberCustomers_invite(data) {
    return request({
        url: MemberCustomers_invite,
        method: 'post',
        data
    })
}

const ManagerInfo = 'wx/TtmallRecord/managerInfo'; //结算页面用户相关信息
export function managerInfo(query) {
    return request({
        url: ManagerInfo,
        method: 'get',
        params: query
    })
}
const TtmallRecordList = 'wx/TtmallRecord/list' //获取用户所有结算记录
export function ttmallRecordList(query) {
    return request({
        url: TtmallRecordList,
        method: 'get',
        params: query
    })
}
const TtmallRecordDetail = 'wx/TtmallRecordDetail/list' // 获取用户结算记录详情
export function ttmallRecordDetail(query) {
    return request({
        url: TtmallRecordDetail,
        method: 'get',
        params: query
    })
}
const IssueList = 'wx/issue/list'; //帮助信息
export function issueList() {
    return request({
        url: IssueList,
        method: 'get'
    })
}

const MaterialList = 'wx/material/list'; //素材列表
export function getMaterialList(query) {
    return request({
        url: MaterialList,
        method: 'get',
        params: query
    })
}
const ListByTagId = 'wx/material/listByTagId'; //根据标签获取素材列表
export function listByTagId(query) {
    return request({
        url: ListByTagId,
        method: 'get',
        params: query
    })
}
const TagList = 'wx/tag/listTag'; //标签列表
export function tagList(query) {
    return request({
        url: TagList,
        method: 'get',
        params: query
    })
}

const AdList = 'wx/ad/listAd'; //广告列表
export function adList(query) {
    return request({
        url: AdList,
        method: 'get',
        params: query
    })
}
const listAdMap = 'wx/ad/listAdMap'; //获取广告列表
export function adListMap(query) {
    return request({
        url: listAdMap,
        method: 'get',
        params: query
    })
}


const ProjectList = 'wx/project/list'; //工程发包列表
export function listProject(query) {
    return request({
        url: ProjectList,
        method: 'get',
        params: query
    })
}


const moreProjectList = 'wx/project/morelist'; // 更多工程发包
export function morelistProject(query) {
    return request({
        url: moreProjectList,
        method: 'get',
        params: query
    })
}

const ProjectDetail = 'wx/project/detail'; //工程发包详情
export function projectDetail(query) {
    return request({
        url: ProjectDetail,
        method: 'get',
        params: query
    })
}
const ProjectDetail2nd = 'wx/project/detail2nd'; //工程发包详情
export function projectDetail2nd(query) {
    return request({
        url: ProjectDetail2nd,
        method: 'get',
        params: query
    })
}
const ProjectSave = 'wx/project/save'; //保存工程发包
export function projectSave(data) {
    return request({
        url: ProjectSave,
        method: 'post',
        data
    })
}

const ProjectUpdate = 'wx/project/update'; //保存工程发包
export function projectUpdate(data) {
    return request({
        url: ProjectUpdate,
        method: 'post',
        data
    })
}




const TeamList = 'wx/teams/list'; //施工队伍列表
export function listTeam(query) {
    return request({
        url: TeamList,
        method: 'get',
        params: query
    })
}

const moreTeamList = 'wx/teams/morelist'; //更多施工队伍列表
export function morelistTeam(query) {
    return request({
        url: moreTeamList,
        method: 'get',
        params: query
    })
}

const TeamDetail = 'wx/teams/detail'; //施工队伍详情
export function teamDetail(query) {
    return request({
        url: TeamDetail,
        method: 'get',
        params: query
    })
}

const TeamSave = 'wx/teams/save'; //保存施工队伍
export function teamSave(data) {
    return request({
        url: TeamSave,
        method: 'post',
        data
    })
}

const TeamUpdate = 'wx/teams/update'; //更新施工队伍
export function teamUpdate(data) {
    return request({
        url: TeamUpdate,
        method: 'post',
        data
    })
}

const UsedList = 'wx/used/list'; //二手商品列表
export function listUsed(query) {
    return request({
        url: UsedList,
        method: 'get',
        params: query
    })
}
const moreUsedList = 'wx/used/morelist'; //更多二手商品列表
export function morelistUsed(query) {
    return request({
        url: moreUsedList,
        method: 'get',
        params: query
    })
}

const ClientUsedList = 'wx/used/clientlist'; //客户二手商品列表
export function listClientUsed(query) {
    return request({
        url: ClientUsedList,
        method: 'get',
        params: query
    })
}


const UsedDetail = 'wx/used/detail'; //二手商品详情
export function usedDetail(query) {
    return request({
        url: UsedDetail,
        method: 'get',
        params: query
    })
}

const UsedSave = 'wx/used/save'; //保存二手发布信息
export function usedSave(data) {
    return request({
        url: UsedSave,
        method: 'post',
        data
    })
}

const UsedUpdate = 'wx/used/update'; //更新二手发布信息
export function usedUpdate(data) {
    return request({
        url: UsedUpdate,
        method: 'post',
        data
    })
}

const UpdateUsedStatus = 'wx/used/updateStatus'; //更新二手商品状态
export function updateUsedStatus(data) {
    return request({
        url: UpdateUsedStatus,
        method: 'post',
        data
    })
}

const UpdateUsedPrice = 'wx/used/updatePrice'; //更新二手商品状态
export function updateUsedPrice(data) {
    return request({
        url: UpdateUsedPrice,
        method: 'post',
        data
    })
}

const DeleteUsedRecord = 'wx/used/deleteRecord'; //删除二手商品记录
export function deleteUsedRecord(data) {
    return request({
        url: DeleteUsedRecord,
        method: 'post',
        data
    })
}

const RentList = 'wx/rent/list';   //出租列表
export function listRent(query) {
    return request({
        url: RentList,
        method: 'get',
        params: query
    })
}

const moreRentList = 'wx/rent/morelist';   //更多出租列表
export function morelistRent(query) {
    return request({
        url: moreRentList,
        method: 'get',
        params: query
    })
}

const RentDetail = 'wx/rent/detail'; //出租商品详情
export function rentDetail(query) {
    return request({
        url: RentDetail,
        method: 'get',
        params: query
    })
}

const RentSave = 'wx/rent/save'; //保存出租发布信息
export function rentSave(data) {
    return request({
        url: RentSave,
        method: 'post',
        data
    })
}

const RentUpdate = 'wx/rent/update'; //更新二手发布信息
export function rentUpdate(data) {
    return request({
        url: RentUpdate,
        method: 'post',
        data
    })
}

const UpdateRentStatus = 'wx/rent/updateStatus'; //更新出租商品状态
export function updateRentStatus(data) {
    return request({
        url: UpdateRentStatus,
        method: 'post',
        data
    })
}
const DeleteRentRecord = 'wx/rent/deleteRecord'; //删除出租商品记录
export function deleteRentRecord(data) {
    return request({
        url: DeleteRentRecord,
        method: 'post',
        data
    })
}

const UpdateTeamsStatus = 'wx/teams/updateStatus'; //更新我的队伍状态
export function updateTeamsStatus(data) {
    return request({
        url: UpdateTeamsStatus,
        method: 'post',
        data
    })
}
const DeleteTeamsRecord = 'wx/teams/deleteRecord'; //删除我的队伍记录
export function deleteTeamsRecord(data) {
    return request({
        url: DeleteTeamsRecord,
        method: 'post',
        data
    })
}

const UpdateProjectStatus = 'wx/project/updateStatus'; //更新我的工程状态
export function updateProjectStatus(data) {
    return request({
        url: UpdateProjectStatus,
        method: 'post',
        data
    })
}
const DeleteProjectRecord = 'wx/project/deleteRecord'; //删除我的工程记录
export function deleteProjectRecord(data) {
    return request({
        url: DeleteProjectRecord,
        method: 'post',
        data
    })
}

const DicItems = 'wx/item/listByGroupId'; //根据groupid获取字典表数据
export function dicItems(query) {
    return request({
        url: DicItems,
        method: 'get',
        params: query
    })
}

const SaveApply = 'wx/apply/saveApply'; // 保存客户申请信息
export function saveApply(data) {
    return request({
        url: SaveApply,
        method: 'post',
        data
    })
}

const GetWxConfig = 'wx/auth/getWxConfig'; // 获取微信jssdk配置
export function getWxConfig(query) {
    return request({
        url: GetWxConfig,
        method: 'get',
        params: query
    })
}

export function shipOrder(data) {
    return request({
        url: 'wx/order/ship',
        method: 'post',
        data
    })
}

export function modify(data) {
    return request({
        url: 'wx/order/modify',
        method: 'post',
        data
    })
}

const Shops = 'wx/serve/list'; //根据城市查询门店列表
export function listShops(query) {
    return request({
        url: Shops,
        method: 'get',
        params: query
    })
}

// 修改门店信息
export function upshod(data) {
    return request({
        url: '/wx/shop/update',
        method: 'post',
        data
    }
    )
}
// 修改联盟门店信息
export function upsholiand(data) {
    return request({
        url: '/wx/shop/updateLianMeng',
        method: 'post',
        data
    }
    )
}

export function getCodeByDistrict(query) {
    return request({
        url: 'wx/serve/getCodeByDistrict',
        method: 'get',
        params: query
    })
}


export function getDetailById(query) {
    return request({
        url: 'wx/serve/detail',
        method: 'get',
        params: query
    })
}
/**
 * @description 获取会员卡信息
 * @param {*} query
 */
export function getMemberCards() {
    return request({
        url: 'wx/goods/getMemberCards',
        method: 'get',
    })
}
/**
 * @description 根据id获取会员卡详细信息
 * @param {*} query
 */
export function getMemberCardDetailById() {
    return request({
        url: 'wx/goods/getMemberCardDetailById',
        method: 'get',
    })
}
/**
 *  @description 线上开通会员
 * @param {*} data
 */
export function setMemberLevelOnline(data) {
    return request({
        url: '/wx/order/setMemberLevelOnline',
        method: 'post',
        data
    })
}

/**
 * 通过Id查询店铺信息
 * @param query
 * @returns {*}
 */
export function findShopById(query) {
    return request({
        url: '/wx/shop/findById',
        params: query
    })
}

/**
 * 查询店铺所有商品
 * @param query
 * @returns {*}
 */
export function goodsListByShopId(query) {
    return request({
        url: "/wx/shopGoods/goodsListByShopId",
        params: query
    })
}

export function shopServiceTypeList() {
    return request({
        url: "wx/shopServiceType/list",
    })
}

/**
 * @description 加盟商列表
 * @param {*} data
 */
export function getMerchantList(query) {
    return request({
        url: '/wx/shop/list',
        method: 'get',
        params: query
    })
}
/**
 * @description 直播间列表
 * @param {*} data
 */
export function getPlayList(query) {
    return request({
        url: '/wx/index/queryBroadcast',
        method: 'get',
        params: query
    })
}
/**
 * @description 判断用户是否具有查看工程发包等模块用户电话号码的权限
 * @param {*} query
 */
export function isAllowedShowTel(query) {
    return request({
        url: '/wx/project/volitedMax',
        method: 'get',
        params: query
    })
}

/**
 * @description 获取新订单id
 * @param {*} query
 */
export function getOrderSign(query) {
    return request({
        url: '/wx/goods/getOrderSign',
        method: 'get',
        params: query
    })
}

/**
 * @description 线上开通10元卡
 * @param {*} query
 */
export function setTenCardOnline(query) {
    return request({
        url: '/wx/goods/getPurchaseInfo',
        method: 'get',
        params: query
    })
}
/**
 * @description 获取且只获取微信用户昵称模板数据
 * @param {*} query
 */
export function queryBorad(query) {
    return request({
        url: '/wx/user/queryBorad',
        method: 'get',
        params: query
    })
}
export const REFUND_LIST = '';



// 查询页面
const recheckt = '/wx/delivery/getUserDelivery';

export function recheck(query) {
    return request({
        url: recheckt,
        method: "get",
        params: query

    })
}


//  添加产品表
const delivery = '/wx/delivery/addDeliveryRecord';

export function livery(data) {
    return request({
        url: delivery,
        method: 'post',
        data
    })
}

//今日资格表
const qulificat = '/wx/delivery/addQualifications';
export function qulifi(data) {
    return request({
        url: qulificat,
        method: 'post',
        data
    })
}

// 今日配置表
const parts = '/wx/delivery/addDeliveryConfigure';
export function prts(data) {
    return request({
        url: parts,
        method: 'post',
        data
    })


}

// 签到接口

const sign = '/wx/delivery/getSign';
export function signtive(query) {
    return request({
        url: sign,
        method: 'get',
        params: query
    })
};

const signPicu = '/wx/delivery/getSignPicturl';
export function signP(query) {
    return request({
        url: signPicu,
        method: 'get',
        params: query,
    })
}
/**
 * @description 承接找活查询分页
 * @param {*} query
 */
export function getContractList(query) {
    return request({
        url: '/wx/contract/queryContractWorkPage',
        method: 'get',
        params: query
    })
}
export function moregetContractList(query) {
    return request({
        url: '/wx/contract/morelist',
        method: 'get',
        params: query
    })
}

/**
 * @description 承接找活数据字典
 * @param {*} query
 */
export function getContractDicItem(query) {
    return request({
        url: '/wx/contract/queryDicItem',
        method: 'get',
        params: query
    })
}
/**
 * @description 承接找活详细页面
 * @param {*} query
 */
export function getContractDetail(query) {
    return request({
        url: '/wx/contract/getContractWorkId',
        method: 'get',
        params: query
    })
}
/**
 * @description 承接找活详细电话号码
 * @param {*} query
 */
export function getContractDetail_tel(query) {
    return request({
        url: '/wx/contract/getContractWorkTel',
        method: 'get',
        params: query
    })
}
/**
 * @description 承接找活个人信息查询
 * @param {*}
 */
export function queryContractWork() {
    return request({
        url: '/wx/contract/queryContractWork',
        method: 'get',
    })
}

/**
 * @description 承接找活用户头像上传
 * @param {*} data
 */
export function uploadContractWork_portrait(data) {
    return request({
        url: '/wx/contract/addContractHead',
        method: 'post',
        data
    })
}

/**
 * @description 承接找活信息编辑
 * @param {*} data
 */
export function editContractWork(data) {
    return request({
        url: '/wx/contract/addContractWork',
        method: 'post',
        data
    })
}
/**
 * @description 门店是否可以观看
 * @param {*}
 */
export function voildteHasWatched(query) {
    return request({
        url: '/wx/contract/voildteUserUsed',
        method: 'get',
        params: query
    })
}

// 昨日收益

// 历史记录
const dailEar = '/wx/ordinaries/listHistory';
export function daea(query) {
    return request({
        url: dailEar,
        method: 'get',
        params: query
    })
}

// 今日收益总额
const daToal = '/wx/ordinaries/dayProfit';
export function toaDay(query) {
    return request({
        url: daToal,
        method: 'get',
        params: query
    })
}

// 问卷调查
export function paper(query) {
    return request({
        url: 'wx/user/queryQuestionnaire',
        method: 'get',
        params: query

    })
}

// 提交问卷
export function subaper(data) {
    return request({
        url: 'wx/user/submitQuestionnaire',
        method: 'post',
        data

    })
}


// 当月总收益
const monthToal = '/wx/ordinaries/monthProfit';
export function montal(query) {
    return request({
        url: monthToal,
        method: 'get',
        params: query,
    })
}
// 今日收列表
const dayList = '/wx/ordinaries/listToday';
export function dayShow(query) {
    return request({
        url: dayList,
        method: 'get',
        params: query
    })
}
// 删除今天列表
const deleTOday = '/wx/ordinaries/deleteToday';
export function deleDay(query) {
    return request({
        url: deleTOday,
        method: 'get',
        params: query
    })
}
// 删除当月数据
const deleMon = '/wx/ordinaries/deleteAll';
export function deleMonth(query) {
    return request({
        url: deleMon,
        method: 'get',
        params: query
    })
}

// 查看用户导入量

const impot = '/wx/user/queryYesterdayUserCount';
export function imo(query) {
    return request({
        url: impot,
        method: 'get',
        params: query,
    })
}


// 获取v_html 列表数据
export function getArticleHtmlList(query) {
    return request({
        url: '/wx/articleHtml/list',
        method: 'get',
        params: query,
    })
}
// 装修版块——————————————————————————————————————————————————————————————————————————————————————————————

// 免费报价

const quotation = '/wx/decorationOffer/list';
export function freequo(query) {
    return request({
        url: quotation,
        method: 'get',
        params: query
    })
}
// sendcode

const sendcode = '/wx/decorationOffer/sendSms';
export function code(query) {
    return request({
        url: sendcode,
        method: 'get',
        params: query,
    })
}
const verification = '/wx/decorationOffer/verifySmsAndOffer';
export function verificat(data) {
    return request({
        url: verification,
        method: 'post',
        data
    })
}

// 工程详情
const rationdetail = '/wx/decorationProjectDetail/findById';//用const定义 是防止路径变量冲突
export function rationtail(query) {
    return request({
        url: rationdetail,
        method: 'get',
        params: query
    })
}
// 工程详情人物接口

export function rationteam(query) {
    return request({
        url: '/wx/decorationWorkerTeam/findById',
        method: 'get',
        params: query
    })
}

// 工地详情
const projec = '/wx/decorationProject/findById';
export function plant(query) {
    return request({
        url: projec,
        method: 'get',
        params: query
    })
}
// 装修公司接口

const decoration = '/wx/decorationCompany/listByIds';
export function getdecList(data) {
    return request({
        url: decoration,
        method: 'post',
        data,
    })

}
// 条件选择商铺

const shopdection = '/wx/decorationShop/findByCondition';
export function shoplister(query) {
    return request({
        url: shopdection,
        method: 'get',
        params: query
    })
}
// 评论接口
const publi = '/wx/ownerComment/saveOrUpdate';
export function abpubli(data) {
    return request({
        url: publi,
        method: 'post',
        data,
    })
}
// 小程序二维码接口

const direct = '/wx/resourcesStorage/findById';
export function directer(query) {
    return request({
        url: direct,
        method: 'get',
        params: query
    })
}

// 装修风格
const stil = '/wx/decorationStyle/list';
export function stiler(query) {
    return request({
        url: stil,
        method: 'get',
        params: query,
    })
}
// 装修预算
const haushalt = "/wx/decorationBudget/list";
export function haushalter(query) {
    return request({
        url: haushalt,
        method: 'get',
        params: query
    })
}
// 装修工地版块
const ration = '/wx/decorationProject/listByIds';
export function fration(data) {
    return request({
        url: ration,
        method: 'post',
        data
    })
}
// 装修接口
const getenterprises = '/wx/decorationShop/findById';
export function getent(query) {
    return request({
        url: getenterprises,
        method: 'get',
        params: query,
    })
}
export function getentlist(query) {
    return request({
        url: '/wx/decorationShop/list',
        method: 'get',
        params: query,
    })
}
// 获取原料轮播图列表数据
export function getRawRotationList(query) {
    return request({
        url: '/wx/rawMaterialBrand/getRotationList',
        method: 'get',
        params: query,
    })
}
// 获取原料分类列表数据
export function getRawCategoryList(query) {
    return request({
        url: '/wx/rawMaterialBrand/getCategoryList',
        method: 'get',
        params: query,
    })
}

// 获取原料品牌列表数据
export function getRawBrandList(query) {
    return request({
        url: '/wx/rawMaterialBrand/getBrandList',
        method: 'get',
        params: query,
    })
}

// 施工团队接口
const experience = '/wx/decorationWorkerTeam/list';
export function exper(query) {
    return request({
        url: experience,
        method: 'get',
        params: query
    })

}

// 评价列表

const orelistt = '/wx/ownerComment/listByShopId';
export function orelis(query) {
    return request({
        url: orelistt,
        method: 'get',
        params: query
    })
}

// 设计团队接口

const DesignT = '/wx/decorationDesignTeam/list';
export function design(query) {
    return request({
        url: DesignT,
        method: 'get',
        params: query,
    })
}
// 设计团队详细信息

const designer = '/wx/decorationDesignTeam/findById';
export function findes(query) {
    return request({
        url: designer,
        method: 'get',
        params: query
    })
}
// 获取原料商品列表数据
export function getRawGoodList(query) {
    return request({
        url: '/wx/rawMaterialBrand/getGoodList',
        method: 'get',
        params: query,
    })
}
// 获取原料商品详情数据
export function getRawGoodDetail(query) {
    return request({
        url: '/wx/rawMaterialBrand/getGoodId',
        method: 'get',
        params: query,
    })
}
// 上传商品用分类
export function classifica(query) {
    return request({
        url: '/wx/goods/getCategoryList',
        method: 'get',
        params: query
    })
}

// 查询我的门店
export function qustores(query) {
    return request({
        url: '/wx/shop/searchMyShop',
        method: 'get',
        params: query
    })
}

// 获取原料商铺详情

export function getRawShopInfo(query) {
    return request({
        url: '/wx/rawMaterialBrand/getShopInfo',
        method: 'get',
        params: query,
    })
}


// 查询联盟店

export function getlianInfo(query) {
    return request({
        url: '/wx/shop/getMyLianMengShop',
        method: 'get',
        params: query,
    })
}

// 案例详情
const decora = '/wx/decorationExample/findById';
export function deco(query) {
    return request({
        url: decora,
        method: 'get',
        params: query,

    })
}

// 添加商品详情

export function adduct(data) {
    return request({
        url: '/wx/shop/create',
        method: 'post',
        data,
    });
}
// 添加联盟店商品详情
export function addlianmen(data) {
    return request({
        url: '/wx/shop/createLianMeng',
        method: 'post',
        data,
    });
}

// 我的商品
export function mainct(query) {
    return request({
        url: '/wx/shop/searchMyShopGood',
        method: 'get',
        params: query
    })
}
// 我的联盟商品
export function liant(query) {
    return request({
        url: '/wx/shop/getMyShopLianMengGood',
        method: 'get',
        params: query
    })
}



// 案例列表

const caselist = '/wx/decorationExample/listByShopId';
export function caselistly(query) {
    return request({
        url: caselist,
        method: 'get',
        params: query

    })
}

// 装修方式列表

export function decorationlist(query) {

    return request({
        url: '/wx/decorationMode/list',
        method: 'get',
        params: query
    })
}

// 户型列表

export function byGroupId(query) {
    return request({
        url: '/wx/item/listByGroupId',
        method: 'get',
        params: query

    })
}

const carousel = '/wx/decorationShop/slideList';
export function cardec(query) {
    return request({
        url: carousel,
        method: 'get',
        params: query

    })
}
// 门店种类
const searchData = '/wx/shop/getSearchData';
export function datasch(query) {
    return request({
        url: searchData,
        method: 'get',
        params: query
    })

}


// 门店轮播
const pmd = '/wx/shop/slideList'
export function pamgt(query) {
    return request({
        url: pmd,
        method: 'get',
        params: query
    })
}

// 获取原料商品规格
export function getRawGoodProductList(query) {
    return request({
        url: '/wx/goods/detail',
        method: 'get',
        params: query,
    })
}

// 用户评价列表


export function oer(data) {
    return request({
        url: '/wx/ownerComment/listByIds',
        method: "post",
        data
    })

}
//原材料版块————————————————————————————————————————————————————————————————————————————————————————————

// 原料购物车添加
export function rawAddCart(data) {
    return request({
        url: '/wx/rawOrder/addCart',
        method: 'post',
        data,
    })
}

// 原料购物车修改
export function rawCartUpdate(data) {
    return request({
        url: '/wx/rawOrder/updateOrder',
        method: 'post',
        data
    })
}

// 购物车 原料商品列表
// export function getRawCartList(query) {
//     return request({
//         url: '/wx/rawMaterialBrand/getCartList',
//         method: 'get',
//         params: query,
//     })
// }

// 删除 原料购物车商品

export function deleteRawCart(data) {
    return request({
        url: '/wx/rawOrder/deleteCart',
        method: 'post',
        data,
    })
}

// 原料购物车商品选中

export function rawCartChecked(data) {
    return request({
        url: '/wx/rawMaterialBrand/checkCarts',
        method: 'post',
        data,
    })
}


// 原料 立即购买
export function rawFastAddCart(data) {
    return request({
        url: '/wx/rawOrder/fastadd',
        method: 'post',
        data,
    })
}
// 原料 获取购物车
export function getRawCartById(query) {
    return request({
        url: '/wx/rawMaterialBrand/getCartId',
        method: 'get',
        params: query,
    })
}

// 门店服务分页查询
const store = '/wx/shop/list';
export function storery(query) {
    return request({
        url: store,
        method: 'get',
        params: query
    })
}
// 门店服务分页查询
const morestore = '/wx/shop/morelist';
export function morestorery(query) {
    return request({
        url: morestore,
        method: 'get',
        params: query
    })
}
// 删除门店
export function storedel(query) {
    return request({
        url: '/wx/shop/deleteShopGood',
        method: 'get',
        params: query,
    })
}
// 删除商品
export function deletem(query) {
    return request({
        url: '/wx/shop/deleteLianMengShopGood',
        method: 'get',
        params: query,
    })
}

// 原料 请求下单接口
export function rawCheckout(data) {
    return request({
        url: '/wx/rawOrder/addGoods',
        method: 'post',
        data,
    })
}
const construction = '/wx/contract/queryContractWorkList';
export function funconstru(query) {
    return request({
        url: construction,
        method: 'get',
        params: query
    })
}
const geocoder = '/wx/home/geocoderV';
export function geocoderV(query) {
    return request({
        url: geocoder,
        method: 'get',
        params: query
    })
}



// 提语
export function tishiP(query) {
    return request({
        url: '/wx/home/projectHint',
        method: 'get',
        params: query
    })
}

// 关注链接
export function craqd(query) {
    return request({
        url: 'wx/auth/createQrCode',
        method: 'get',
        params: query,
    })

}

// 团购详细
export function purchaseDetails(query) {
    return request({
        url: 'wx/groupon/detail',
        method: 'get',
        params: query
    })
}

// 团购商品列表
export function groupList(query) {
    return request({
        url: 'wx/groupon/list',
        method: 'get',
        params: query,
    })
}
// 团购人员列表
export function groupren(query) {
    return request({
        url: 'wx/groupon/grouponList',
        method: 'get',
        params: query,
    })
}

export function collage(query) {
    return request({
        url: GroupOnJoin,
        method: 'get',
        params: query
    })
}
// 联盟店信息
export function alliance(query) {
    return request({
        url: 'wx/auth/getUserCard',
        method: 'get',
        params: query
    })
}

export function defure(query) {
    return request({
        url: 'wx/home/homeButtonTus',
        method: 'get',
        params: query
    })
}

